Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: debug count and popup #4921

Merged
merged 10 commits into from
Oct 28, 2023
Merged

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Oct 27, 2023

Description

This PR refactors the debug count/-popup to be able to format large numbers and data sizes properly. The following changes were made in the commits:

  • Moved implementation of the methods to the cpp file.
  • Added DebugCount::Flag(s) and DebugCount::configure(name, flags).
  • Moved from QMap to std::map (order is important here).
  • Used QStringBuilder for concatenations.
  • Used QLocale for formatting (adds separators).
  • Added DebugCount::Flag::DataSize for data sizes in bytes (and fixed language to English).
  • Used DataSize for image sizes (maybe this should be moved somewhere else?).
  • Added copy button to popup.
  • Fixed Image usage reporting being eight times too large (could be another PR, but honestly it's four characters).
Before After
before after

@pajlada pajlada changed the title Refactor debug count and popup refactor: debug count and popup Oct 28, 2023
@pajlada pajlada merged commit 7ecbfa0 into Chatterino:master Oct 28, 2023
15 checks passed
@Nerixyz Nerixyz deleted the refactor/debug-count branch October 28, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants